package week01;

public class TicketMaker {

//    public static void main(String[] args) {
//	// write your code here
//        System.out.println("Hello Word");
//    }
    private TicketMaker(){}
    private static TicketMaker ticketMaker = null;
    private int ticketNumber = 1000;

    public static TicketMaker getInstance(){
        if(ticketMaker==null){
            ticketMaker = new TicketMaker();
        }
//        else{
//            ticketMaker = TicketMaker.getInstance();
//        }
        return ticketMaker;
    }
    public int getNextTicketNumber(){
        return ticketNumber++;
    }
//swxu_2005设置为观察者
// 学号_DP
}
